package nc.bs.gl.bg;

import java.util.LinkedHashMap;

import nc.bs.gl.bp.OacBp;
import nc.bs.pub.pa.PreAlertObject;
import nc.bs.pub.taskcenter.BgWorkingContext;
import nc.bs.pub.taskcenter.IBackgroundWorkPlugin;
import nc.vo.pub.BusinessException;

public class OaVoucherCBg implements IBackgroundWorkPlugin {

	@Override
	public PreAlertObject executeTask(BgWorkingContext context)
			throws BusinessException {
		
		exec(context);
		
		return null;
	}

	private synchronized void exec(BgWorkingContext context) throws BusinessException {
		LinkedHashMap<String, Object> map = context.getKeyMap();
		String bg_user = (String) map.get("bg_user");
		new OacBp().exec(bg_user);
	}

}
